package com.syl.starter.mp;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;
import com.baomidou.mybatisplus.generator.config.PackageConfig;
import com.syl.starter.mp.generate.SimpleCodeGenerate;

/**
 * @author syl
 * @create 2019-05-21 9:31
 **/
public class main {

    public static void main(String[] args) throws Exception {
        DataSourceConfig dsc = new DataSourceConfig();
        dsc.setDbType(DbType.MYSQL);
        dsc.setDriverName("com.mysql.cj.jdbc.Driver");
        dsc.setUsername("root");
        dsc.setPassword("");
        dsc.setUrl("jdbc:mysql://127.0.0.1:3306/qianyin?useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&autoReconnect=true&useSSL=false");

        PackageConfig pc = new PackageConfig();
        pc.setParent("com.finder.qianying");
        pc.setEntity("entity.data");
        pc.setMapper("biz.dao");
        pc.setService("biz.service");
        pc.setServiceImpl("biz.service.impl");

        new SimpleCodeGenerate(
                "E:\\IdeaProjects\\plus-test",
                "syl",
                null,
                true)
        .setTableNames("mac_vod")
        .setTablePrefixWipes("mac_")
        .setDataSourceConfig(dsc)
        .setPackageConfig(pc)
        .start()
        ;


    }

}
